-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PERF] remove pointee types from cg_ssa and cg_llvm #105412
Conversation
i expected to need to add casts to load/store/memcpy/memmove/memset/etc. but they already pointercast their arguments, so with the (relatively minimal) number of pointer types created in cg_ssa, this should work?
(LLVM 13 failure is expected, since this uses opaque pointer apis) |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 68cabc0 with merge 04e8510cb4b06cc25af99d5841acc4a2b9e3a4ca... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (04e8510cb4b06cc25af99d5841acc4a2b9e3a4ca): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Wow, this doesn't help at all! Interesting... I didn't expect the pointercast removal to improve anything (since LLVM will either avoid generating I guess I'll invert this change, leave pointer types in cg_ssa, and only keep the cg_llvm changes as a future cleanup. |
cleanup: remove pointee types This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after rust-lang#114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.) I initially hoped this would provide some minor perf win, but in rust-lang#105412 (comment) it had very little impact, so this is only valuable as a cleanup. As a followup, this will enable rust-lang#96242 to be resolved. r? `@ghost` `@rustbot` label S-blocked
cleanup: remove pointee types This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after #114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.) I initially hoped this would provide some minor perf win, but in rust-lang/rust#105412 (comment) it had very little impact, so this is only valuable as a cleanup. As a followup, this will enable #96242 to be resolved. r? `@ghost` `@rustbot` label S-blocked
cleanup: remove pointee types This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after #114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.) I initially hoped this would provide some minor perf win, but in rust-lang/rust#105412 (comment) it had very little impact, so this is only valuable as a cleanup. As a followup, this will enable #96242 to be resolved. r? `@ghost` `@rustbot` label S-blocked
Modern LLVM (15+ by default) doesn't have pointee types, so computing them is a waste of time.
This can't be merged in its current state, because:
-Cllvm-args="-opaque-pointers=0"
(not sure that we should support this configuration though)Workarounds could be:
cx.type_ptr_to(|| ...compute pointee type...)
, closure only called in LLVM < 15 (kinda awkward)if llvm_version < 15 { cx.type_ptr_to(...compute pointee type...) } else { cx.type_i8p() }
only at important callsites (might have to end up doing this)This is just to measure the max possible perf win from everything.
r? @ghost
@rustbot label S-experimental